package cn.com.shopec.erp.common.utils;

public class LongUtil {

	public static boolean eqZero(Long l) {
		if (l != null) {
			return l.longValue() == 0L;
		}
		return false;
	}

	public static boolean neZero(Long l) {
		if (l != null) {
			return l.longValue() != 0L;
		}
		return false;
	}

	public static boolean leZero(Long l) {
		if (l != null) {
			return l.longValue() <= 0L;
		}
		return false;
	}

	public static boolean geZero(Long l) {
		if (l != null) {
			return l.longValue() >= 0L;
		}
		return false;
	}

	public static boolean ltZero(Long l) {
		if (l != null) {
			return l.longValue() < 0L;
		}
		return false;
	}

	public static boolean gtZero(Long l) {
		if (l != null) {
			return l.longValue() > 0L;
		}
		return false;
	}

	/**
	 * 封装类转换为基本类型（为空时则返回0）
	 * 
	 * @param l
	 * @return
	 */
	public static long valuesOf(Long l) {
		if (l != null) {
			return l.longValue();
		}
		return 0;
	}
}
